{% load engine_tags %}

{% if not min_length and query %}

    <div class="ui blue basic message">
        <i class="info icon"></i>Enter more characters to perform search.
    </div>

{% elif no_results %}

    <div class="ui warning message">
        <i class="search minus icon"></i> No results found.
    </div>

{% elif query %}

<div class="ui green searchblock segment" >

<div class="ui relaxed divided list">

    {% for recipe in results %}
        <div class="item">
            <img class="ui avatar image" src="{% img recipe %}">
            <div class="content">
                 <div class="ui header"><a href="{{recipe.url}}">{{recipe.name|highlight:query |safe}}</a></div>
                 <div class="description">{{recipe.text|highlight:query|safe }}</div>
            </div>
        </div>
    {% endfor %}

</div>
</div>
{% endif %}

